import { Space, Button } from "antd";
import { useEditor } from "@craftjs/core";
import { DraggableFormText } from "./user/DraggableFormText";

export const Toolbox = () => {
  const {
    connectors: { create },
  } = useEditor();

  return (
    <Space direction="vertical">
      <Button
        type="dashed"
        ref={(ref) => create(ref as HTMLElement, <DraggableFormText />)}
      >
        FormText
      </Button>
    </Space>
  );
};
